package com.amit.hibernate;

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;

public class CHibernateUtil {
	
	static SessionFactory sessionfactory;

	public static SessionFactory getfactory() {
		
		AnnotationConfiguration cfg=new AnnotationConfiguration();
		cfg=(AnnotationConfiguration) cfg.configure();
		
	  sessionfactory=cfg.buildSessionFactory();
		
		
		
		
		return sessionfactory;
	}

}
